import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/Login.vue')
    },
    {
      path: '/manage',
      name: 'Manage',
      component: () => import('../views/Manage.vue'),
      children: [
        {
          path: '/user',
          name: 'User',
          component: () => import('../views/User.vue')
        },
        {
          path: '/log',
          name: 'Log',
          component: () => import('../views/Log.vue')
        },
        {
          path: '/defectTask',
          name: 'DefectTask',
          component: () => import('../views/DefectTask.vue')
        }, {
          path: '/tower',
          name: 'Tower',
          component: () => import('../views/Tower.vue')
        },
        {
          path: '/inspectionReception',
          name: 'InspectionReception',
          component: () => import('../views/InspectionReception.vue')
        },
        {
          path: '/role',
          name: 'Role',
          component: () => import('../views/Role.vue')
        },
        {
          path: '/inspectionTask',
          name: 'InspectionTask',
          component: () => import('../views/InspectionTask.vue')
        },
        {
          path: '/defectReception',
          name: 'defectReception',
          component: () => import('../views/defectReception.vue')
        }
      ]
    }
  ]
})
